home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / scorched.swf / scripts / frame_116 / DoAction_11.as < prev    next >
Encoding:
Text File  |  2010-04-12  |  1.1 KB  |  44 lines

  1. function explodebomb()
  2. {
  3.    scorchlayer++;
  4.    scorchmarks.temp.attachMovie("scorch","scorch" + scorchlayer,scorchlayer);
  5.    with(eval("this.scorchmarks.temp.scorch" + scorchlayer))
  6.    {
  7.       _x = bx;
  8.       _y = by;
  9.       _width = bombsize * 1.3;
  10.       _height = bombsize * 1.3;
  11.    }
  12.    eval("this.scorchmarks.temp.scorch" + (scorchlayer - 10)).play();
  13.    lastbx = undefined;
  14.    lastby = undefined;
  15.    obx = 0;
  16.    oby = 0;
  17.    area = bombforce / (landdetail / 2);
  18.    damage = Math.floor(bombsize / 2);
  19.    i = 1;
  20.    while(i < area)
  21.    {
  22.       b = hitarraynum - i;
  23.       x = hitx + damage * Math.sin(i);
  24.       hitit = Math.floor(x / landdetail);
  25.       b = landarray[hitit];
  26.       y = hity + damage * Math.cos(i);
  27.       if(b < y)
  28.       {
  29.          landarray[hitit] = y;
  30.       }
  31.       i += 0.1;
  32.    }
  33.    explodesteps = 30;
  34.    explodealpha = 100;
  35.    action = "animate explosion";
  36.    c = 10 + bombforce / 2;
  37.    bomb._x = -10;
  38.    bt = "bomb" + (explosiontype - 1) + "explode";
  39.    attachMovie(bt,"bombland",17);
  40.    bombland._x = bx;
  41.    bombland._y = by;
  42. }
  43. scorchlayer = 300;
  44.